<%-- 
    Document   : add_student_post
    Created on : Nov 24, 2011, 8:18:50 PM
    Author     : THIENSUHACK
--%>

<%@page import="GetData.CharsetFilter"%>
<%@page import="java.util.Calendar"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="GetData.DataWS"%>
<%@page import="DTO.giangvien"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
 request.setCharacterEncoding("UTF-8");
    response.setCharacterEncoding("UTF-8");
    response.setContentType("text/html; charset=UTF-8"); 
    //CharsetFilter ab=new CharsetFilter();

giangvien gv = new giangvien();

gv.setHoten(request.getParameter("hoten"));   
gv.setGioitinh(Short.valueOf(request.getParameter("gioitinh")));
gv.setDiachi(request.getParameter("diachi"));
gv.setEmail(request.getParameter("email"));
gv.setPhone(request.getParameter("phone"));
gv.setNgaysinh(request.getParameter("ngaysinh"));
gv.setHocvihocham(request.getParameter("hocvi"));
   int result=0;
   DataWS a=new DataWS();
   
//gv.setHoten(ab.toUTF8(gv.getHoten()));
//gv.setDiachi(ab.toUTF8(gv.getDiachi()));

   result=a.themgiangvien(gv.getHoten(),gv.getGioitinh(),gv.getNgaysinh(), gv.getHocvihocham(), gv.getDiachi(), gv.getEmail(), gv.getPhone());
   if(result>0)
             {
       out.print("thanh cong");
              response.sendRedirect("/DKTC/admin/index.jsp?page=list_teacher");

   }
   else
       out.print("that bai");
           %>